/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UIViewController : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UIViewController); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UIViewController, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodUpdateViewConstraints0;
        bool isCallingUpdateViewConstraints0= false;
        
            public override void UpdateViewConstraints() 
            { 
                if (methodUpdateViewConstraints0 == null && instance!=null )
                {
                    methodUpdateViewConstraints0 = instance.Type.GetMethod("UpdateViewConstraints", 0);
                }
                if (methodUpdateViewConstraints0 != null && !isCallingUpdateViewConstraints0)
                {
                    isCallingUpdateViewConstraints0 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodUpdateViewConstraints0, instance, null );
                        
                        
                        
                        isCallingUpdateViewConstraints0 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In UpdateViewConstraints *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.UpdateViewConstraints();
                        
                    

                }
            }
        
        
        
        IMethod methodViewDidAppear1;
        bool isCallingViewDidAppear1= false;
        
            public override void ViewDidAppear(System.Boolean p0) 
            { 
                if (methodViewDidAppear1 == null && instance!=null )
                {
                    methodViewDidAppear1 = instance.Type.GetMethod("ViewDidAppear", 1);
                }
                if (methodViewDidAppear1 != null && !isCallingViewDidAppear1)
                {
                    isCallingViewDidAppear1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodViewDidAppear1, instance, param );
                        
                        
                        isCallingViewDidAppear1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewDidAppear *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewDidAppear(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodViewDidDisappear2;
        bool isCallingViewDidDisappear2= false;
        
            public override void ViewDidDisappear(System.Boolean p0) 
            { 
                if (methodViewDidDisappear2 == null && instance!=null )
                {
                    methodViewDidDisappear2 = instance.Type.GetMethod("ViewDidDisappear", 1);
                }
                if (methodViewDidDisappear2 != null && !isCallingViewDidDisappear2)
                {
                    isCallingViewDidDisappear2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodViewDidDisappear2, instance, param );
                        
                        
                        isCallingViewDidDisappear2 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewDidDisappear *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewDidDisappear(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodViewDidLayoutSubviews3;
        bool isCallingViewDidLayoutSubviews3= false;
        
            public override void ViewDidLayoutSubviews() 
            { 
                if (methodViewDidLayoutSubviews3 == null && instance!=null )
                {
                    methodViewDidLayoutSubviews3 = instance.Type.GetMethod("ViewDidLayoutSubviews", 0);
                }
                if (methodViewDidLayoutSubviews3 != null && !isCallingViewDidLayoutSubviews3)
                {
                    isCallingViewDidLayoutSubviews3 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewDidLayoutSubviews3, instance, null );
                        
                        
                        
                        isCallingViewDidLayoutSubviews3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewDidLayoutSubviews *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewDidLayoutSubviews();
                        
                    

                }
            }
        
        
        
        IMethod methodViewDidLoad4;
        bool isCallingViewDidLoad4= false;
        
            public override void ViewDidLoad() 
            { 
                if (methodViewDidLoad4 == null && instance!=null )
                {
                    methodViewDidLoad4 = instance.Type.GetMethod("ViewDidLoad", 0);
                }
                if (methodViewDidLoad4 != null && !isCallingViewDidLoad4)
                {
                    isCallingViewDidLoad4 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewDidLoad4, instance, null );
                        
                        
                        
                        isCallingViewDidLoad4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewDidLoad *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewDidLoad();
                        
                    

                }
            }
        
        
        
        IMethod methodViewDidUnload5;
        bool isCallingViewDidUnload5= false;
        
            public override void ViewDidUnload() 
            { 
                if (methodViewDidUnload5 == null && instance!=null )
                {
                    methodViewDidUnload5 = instance.Type.GetMethod("ViewDidUnload", 0);
                }
                if (methodViewDidUnload5 != null && !isCallingViewDidUnload5)
                {
                    isCallingViewDidUnload5 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewDidUnload5, instance, null );
                        
                        
                        
                        isCallingViewDidUnload5 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewDidUnload *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewDidUnload();
                        
                    

                }
            }
        
        
        
        IMethod methodViewLayoutMarginsDidChange6;
        bool isCallingViewLayoutMarginsDidChange6= false;
        
            public override void ViewLayoutMarginsDidChange() 
            { 
                if (methodViewLayoutMarginsDidChange6 == null && instance!=null )
                {
                    methodViewLayoutMarginsDidChange6 = instance.Type.GetMethod("ViewLayoutMarginsDidChange", 0);
                }
                if (methodViewLayoutMarginsDidChange6 != null && !isCallingViewLayoutMarginsDidChange6)
                {
                    isCallingViewLayoutMarginsDidChange6 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewLayoutMarginsDidChange6, instance, null );
                        
                        
                        
                        isCallingViewLayoutMarginsDidChange6 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewLayoutMarginsDidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewLayoutMarginsDidChange();
                        
                    

                }
            }
        
        
        
        IMethod methodViewSafeAreaInsetsDidChange7;
        bool isCallingViewSafeAreaInsetsDidChange7= false;
        
            public override void ViewSafeAreaInsetsDidChange() 
            { 
                if (methodViewSafeAreaInsetsDidChange7 == null && instance!=null )
                {
                    methodViewSafeAreaInsetsDidChange7 = instance.Type.GetMethod("ViewSafeAreaInsetsDidChange", 0);
                }
                if (methodViewSafeAreaInsetsDidChange7 != null && !isCallingViewSafeAreaInsetsDidChange7)
                {
                    isCallingViewSafeAreaInsetsDidChange7 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewSafeAreaInsetsDidChange7, instance, null );
                        
                        
                        
                        isCallingViewSafeAreaInsetsDidChange7 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewSafeAreaInsetsDidChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewSafeAreaInsetsDidChange();
                        
                    

                }
            }
        
        
        
        IMethod methodViewWillAppear8;
        bool isCallingViewWillAppear8= false;
        
            public override void ViewWillAppear(System.Boolean p0) 
            { 
                if (methodViewWillAppear8 == null && instance!=null )
                {
                    methodViewWillAppear8 = instance.Type.GetMethod("ViewWillAppear", 1);
                }
                if (methodViewWillAppear8 != null && !isCallingViewWillAppear8)
                {
                    isCallingViewWillAppear8 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodViewWillAppear8, instance, param );
                        
                        
                        isCallingViewWillAppear8 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewWillAppear *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewWillAppear(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodViewWillDisappear9;
        bool isCallingViewWillDisappear9= false;
        
            public override void ViewWillDisappear(System.Boolean p0) 
            { 
                if (methodViewWillDisappear9 == null && instance!=null )
                {
                    methodViewWillDisappear9 = instance.Type.GetMethod("ViewWillDisappear", 1);
                }
                if (methodViewWillDisappear9 != null && !isCallingViewWillDisappear9)
                {
                    isCallingViewWillDisappear9 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodViewWillDisappear9, instance, param );
                        
                        
                        isCallingViewWillDisappear9 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewWillDisappear *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewWillDisappear(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodViewWillLayoutSubviews10;
        bool isCallingViewWillLayoutSubviews10= false;
        
            public override void ViewWillLayoutSubviews() 
            { 
                if (methodViewWillLayoutSubviews10 == null && instance!=null )
                {
                    methodViewWillLayoutSubviews10 = instance.Type.GetMethod("ViewWillLayoutSubviews", 0);
                }
                if (methodViewWillLayoutSubviews10 != null && !isCallingViewWillLayoutSubviews10)
                {
                    isCallingViewWillLayoutSubviews10 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewWillLayoutSubviews10, instance, null );
                        
                        
                        
                        isCallingViewWillLayoutSubviews10 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewWillLayoutSubviews *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewWillLayoutSubviews();
                        
                    

                }
            }
        
        
        
        IMethod methodViewWillTransitionToSize11;
        bool isCallingViewWillTransitionToSize11= false;
        
            public override void ViewWillTransitionToSize(CoreGraphics.CGSize p0, UIKit.IUIViewControllerTransitionCoordinator p1) 
            { 
                if (methodViewWillTransitionToSize11 == null && instance!=null )
                {
                    methodViewWillTransitionToSize11 = instance.Type.GetMethod("ViewWillTransitionToSize", 2);
                }
                if (methodViewWillTransitionToSize11 != null && !isCallingViewWillTransitionToSize11)
                {
                    isCallingViewWillTransitionToSize11 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                        };
                        object ret = appDomain.Invoke(methodViewWillTransitionToSize11, instance, param );
                        
                        
                        isCallingViewWillTransitionToSize11 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewWillTransitionToSize *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewWillTransitionToSize(p0, p1);
                        
                    

                }
            }
        
        
        
        IMethod methodViewWillUnload12;
        bool isCallingViewWillUnload12= false;
        
            public override void ViewWillUnload() 
            { 
                if (methodViewWillUnload12 == null && instance!=null )
                {
                    methodViewWillUnload12 = instance.Type.GetMethod("ViewWillUnload", 0);
                }
                if (methodViewWillUnload12 != null && !isCallingViewWillUnload12)
                {
                    isCallingViewWillUnload12 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodViewWillUnload12, instance, null );
                        
                        
                        
                        isCallingViewWillUnload12 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In ViewWillUnload *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.ViewWillUnload();
                        
                    

                }
            }
        
        
    }
}